<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport"
        content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
  </style>
</head>
<body>
  <input type="text">

  <script>
    function Animal() {}
    // 静态方法
    Animal.eat = function () { }
    // 原型方法
    Animal.prototype.eat = () => {
      console.log("eat")
    }


    function People() {

    }

    People.prototype.__proto__ = Animal.prototype
    const p1 = new People()
    p1.eat()

    const is = p1 instanceof People   // p1 __proto__  => People.prototype => __proto__
    console.log(p1 instanceof Animal)

  </script>
</body>
</html>
